<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"  
	  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

	<head>
		<meta charset="utf-8">
		<title>#(projectName)</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
 		#@header()
 	<script>
			var navData=#(funcList);
			var userId="#(vs.code)";
			var _path="#(path)";
	</script>
	</head>
	<body>
		<div class="layui-layout layui-layout-admin" style="border-bottom: solid 1px #1aa094;">
			<div class="layui-header header header-demo">
				<div class="layui-main">
					<div class="admin-login-box">
						<a class="logo" style="left: 0;">
							<span style="font-size: 22px;">#(projectName)</span>
						</a>
						<div class="admin-side-toggle layui-hide-xs" title="隐藏菜单">
							<i class="fa fa-bars" aria-hidden="true"></i>
						</div>
						<div class="admin-side-full layui-hide-xs" title="全屏">
							<i class="fa fa-life-bouy" aria-hidden="true"></i>
						</div>
					</div>
					<ul class="layui-nav admin-header-item">
						<!-- <li class="layui-nav-item">
							<a href="javascript:;">清除缓存</a>
						</li> -->
						<li class="layui-nav-item">
							<a href="javascript:;" class="admin-header-user">
								<img src="#(path)/static/img/#(vs.type).png" />
								<span>#(vs.name??)</span>
							</a>
							<dl class="layui-nav-child">
								<dd id="userInfor">
									<a href="javascript:;"><i class="fa fa-user-circle" aria-hidden="true"></i> 个人信息</a>
								</dd>
								<dd id="passwd">
									<a href="javascript:;"><i class="fa fa-gear" aria-hidden="true"></i> 修改密码</a>
								</dd>
								<dd id="lock">
									<a href="javascript:;">
										<i class="fa fa-lock" aria-hidden="true" style="padding-right: 3px;padding-left: 1px;"></i> 锁屏 (Alt+L)
									</a>
								</dd>
								<dd>
									<a href="#(path)/logout"><i class="fa fa-sign-out" aria-hidden="true"></i> 注销</a>
								</dd>
							</dl>
						</li>
					</ul>
					
				</div>
			</div>
			<div class="layui-side layui-bg-black" id="admin-side">
				<div class="layui-side-scroll" id="admin-navbar-side" lay-filter="side">
				</div>
			</div>
			<div class="layui-body" style="bottom: 0;/* border-left: solid 2px #1AA094; */" id="admin-body">
				<div class="layui-tab admin-nav-card layui-tab-brief" lay-filter="admin-tab">
					<ul class="layui-tab-title">
						<li class="layui-this">
							<i class="layui-icon #(frameMainViewIcon??'layui-icon-home')" aria-hidden="true"></i>
							<cite>#(frameMainViewName??'主页')</cite>
						</li>
					</ul>
					<div class="layui-tab-content" style="min-height: 150px; padding: 0px 0 0 0;">
						<div class="layui-tab-item layui-show">
							#if(vs.funcMap.get('frame_main_view'))
							<iframe src="#(frameMainView??)"></iframe>
							#end
						</div>
					</div>
				</div>
			</div>
			<div class="layui-footer footer layui-hide-xs" id="admin-footer" style="z-index:999">
				<div class="layui-main">
					<p>
						<a href="https://www.qinhaisenlin.com" target="_bank">Copyright &copy;2019 #(copyright)</a>
					</p>
				</div>
			</div>
			<div class="site-tree-mobile layui-hide">
				<i class="layui-icon">&#xe602;</i>
			</div>
			<div class="site-mobile-shade"></div>
			
			<!--锁屏模板 start-->
			<script type="text/template" id="lock-temp">
				<div class="admin-header-lock" id="lock-box">
					<div class="admin-header-lock-img">
						<img src="#(path)/static/img/#(vs.type).png"/>
					</div>
					<div class="admin-header-lock-name" id="lockUserName">#(vs.name)</div>
					<input type="text" class="admin-header-lock-input" value="输入密码解锁.." name="password" id="lockPwd" />
					<button class="layui-btn layui-btn-small" id="unlock">解锁</button>
				</div>
			</script>
			<!--锁屏模板 end -->
			
			 #@footer()
			 <script src="#(path)/static/libs/ext/index.js?t=#(version)" type="text/javascript" ></script>
			<script>
				layui.use('layer', function() {
					var $ = layui.jquery,
						layer = layui.layer;

					$('#userInfor').on('click', function() {
						openDialog('个人信息','#(path)/portal/core/sysUser/my?id='+userId,false,800,500,null);
                    });
                    $('#passwd').on('click', function () {
                    	openDialog('修改密码','#(path)/portal/core/sysUser/myPassword?id='+userId,false,450,300,null);
                    });
                    
                    for(var i=0;i<navData.length;i++){
                        //打开一级菜单tab
                		if(navData[i].spread&&navData[i].children.length==0){
                			setTimeout("openTab('"+navData[i].title+"','"+navData[i].href+"')",100);   						
   						}else {
							for(var j=0;j<navData[i].children.length;j++){
								//打开二级菜单tab
								if(navData[i].children[j].spread&&navData[i].children[j].children.length==0){
									setTimeout("openTab('"+navData[i].children[j].title+"','"+navData[i].children[j].href+"')",100);								
								}else{
									for(var k=0;k<navData[i].children[j].children.length;k++){
										//打开三级菜单tab
										if(navData[i].children[j].children[k].spread){
											setTimeout("openTab('"+navData[i].children[j].children[k].title+"','"+navData[i].children[j].children[k].href+"')",100);
										}
									}
								}
							}
       					}
                    	
                    }
                    
				});

				//添加选项卡
				function openTab(title,url){
					tab.tabAdd({
			            href: url,
			            icon: '',
			            title: title
			        });
				}
				//删除当前页选项卡
				function deleteTab(){
					var id=tab.getCurrentTabId();
					tab.deleteTab(id);
				}
	
			</script>
		</div>
	</body>

</html>